package level;

import entity.terrain.Terrain;

/************************************************************************************
 *  Change the constructor to read and XML file to create the particulars of levels *
 ************************************************************************************/

/**
 * A level representation. A level stores the current Terrain positions.
 * 
 * @author Neil Cowzer
 */
public class Level {
	/** The current Level's goal. */
	private Goal goal;
	
	/** The current Level's map. */
	private Map map;
	
	/**
	 * Create a new Level.
	 * 
	 * @param startX the x-coordinate of the start point
	 * @param startY the y-coordinate of the start point
	 * @param endX the x-coordinate of the end point
	 * @param endY the y-coordinate of the end point
	 * @param timelimit the maximum amount of time to save the required Lemmings.
	 * @param numToSave the minimum number of lemmings to save.
	 * @param terrain an array of the Level's Terrain.
	 */
	/*@ requires startX.....Terrain != null;
		assignable map && goal;
	@*/
	public Level(int startX, int startY, int endX, int endY, int timelimit, int num2Save, Terrain[] terrain){
		map = new Map (startX, startY, endX, endY, terrain);
		goal = new Goal (timelimit, num2Save);
	}

	/**
	 * Retrieve the Goal.
	 * 
	 * @return the Goal of the Level
	 */
	public /*@ pure @*/ Goal getGoal() {
		return goal;
	}

	/**
	 * Retrieve the Map.
	 * 
	 * @return the Map of the Level
	 */
	public /*@ pure @*/ Map getMap() {
		return map;
	}
}
